<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href='<?php echo asset_url()."customcss/custombody.css"; ?>'>
<title>AITAA&reg - Send Request</title>
<script type="text/javascript">
function validateForm() {
	  var yname = document.forms["contact"]["yname"].value;
	  if (yname==null || yname=="")
	    {
		alert('Enter Your Name');
	    return false;
	    }
	   var yemail = document.forms["contact"]["yemail"].value;
	   if (yemail==null || yemail=="")
	    {
		alert('Enter your email');
	    return false;
	    }
	   else if(!validateEmailAddress(yemail))
	   {
		   alert('Enter a valid email id');
		   return false;
	   }
	}

function validateEmailAddress(emailID) { 
    var emailRgx = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return emailRgx .test(emailID);
} 

</script>
</head>
<body>
<div id="container"><br>
<?php foreach ($query as $row) {?>
<h3><span class="label label-primary">Request For User Information </span></h3><br /><br /><br />
<form method="post" action="<?php echo base_url()."index.php/public/contact/process" ?>" name="contact" onsubmit="return validateForm()">
<input type="hidden" name="id" value='<?php echo $row->id; ?>'>
<table class="table table-hover">
<tr><th>Your Name *</th><td><input type="text" value=""  class="form-control" name="yname"></td></tr>
<tr><th>Your Email Id *</th><td><input type="email" value=""  class="form-control" name="yemail"></td></tr>
<tr><th>Name</th><td><input type="text" value="<?php echo $row->name?>"  class="form-control" name="name" ></td></tr>
<tr><th>Company/College/University</th><td><input type="text" class="form-control" value="<?php echo $row->current_company?>" name="comp" ></td></tr>
<tr><th>Location</th><td><input type="text" class="form-control" value="<?php echo $row->curren_loc?>" name="loc" ></td></tr>
<tr><th>Reason for Requesting to Contact</th><td><textarea rows="4" cols="100" name="req" placeholder="Do Not Include any contact numbers or hyper link. Any abusive mail will result in blocking of IP"></textarea>  </td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="Send Request"></td></tr>
</table>
</form>
<?php } ?>
</div>
	<script src='<?php echo asset_url()."/js/bootstrap.min.js"?>'></script>
	<script src='<?php echo asset_url()."/js/jquery-1.10.2.min.js"?>'></script>
	</body>
</html>